export const now = new Date();
export const nowDate = (now.getFullYear()).toString()+'-0'+(now.getMonth()+1).toString();
export const tableOption = {
  "border": true,
  "index": true,
  "indexLabel": "序号",
  "stripe": true,
  "menuAlign": "center",
  "align": "center",
  tip: false,
  addBtn: false,
  editBtn: false,
  selection:false,
  delBtn:false,
  searchLabelWidth:100,
  searchMenuSpan: 6,
  menu: false,
  "column": [
    {
      "type": "input",
      "label": "唯一标识",
      "prop": "id",
      hide: true,
      display: false,
    },{
      "type": "select",
      "label": "线路",
      "prop": "lineCode",
      cascaderItem: ["stationCode"],
      props: {
        label: 'name',
        value: 'code'
      },
      dicUrl: "/support/swparamline/dict",
      search: true,
      display: false
    }, {
      "type": "select",
      "label": "车站",
      "prop": "stationCode",
      props: {
        label: 'name',
        value: 'code'
      },
      dicFlag: false,
      dicUrl: "/support/swparamstation/dict/{{key}}",
      search: true,
      display: false
    },
    {
      "type": "month",
      "label": "盘点时间",
      "prop": "statisticsDate",
      search: true,
      searchValue: nowDate,
      format: "yyyy-MM",
      valueFormat: "yyyy-MM"
    }, {
      label: '票种',
      prop: 'ticketTypeEn',
      type: 'select',
      dicUrl: "/support/swpmticketcardtype/dict",
      props: {
        label: 'mainName',
        value: 'mainEnName'
      }
    }, {
      "type": "input",
      "label": "盘点数量",
      "prop": "balanceToday"
    }, {
      "type": "input",
      "label": "SC接口数量",
      "prop": "scDcpAmount"
    }, {
      "type": "input",
      "label": "差异数量",
      "prop": "diffCount",
      formatter: (row, value, label, column) => {
        const balanceToday = row.balanceToday;
        const scDcpAmount = row.scDcpAmount;
        row.diffCount = balanceToday - scDcpAmount;
        return row.diffCount;
      }
    }]
}
